package common;

import cn.hutool.core.util.ArrayUtil;


public class ArrayUtils {

    public static void printArr(Object arr ) {
        System.out.println("arr:" + ArrayUtil.toString(arr));
    }

    public static void printMatrixArr(int[][] arr) {
        printMatrixArr(arr, Integer.MAX_VALUE);
    }

    public static void printMatrixArr(int[][] arr, int limit) {
        for (int i = 0; i < arr.length && i < limit; i++) {
            System.out.print(i + " [");
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(" " + arr[i][j] + " ");
            }
            System.out.print("]");
            System.out.println();
        }
        System.out.println("---------");
    }


}
